package com.aaron.clusterquartz.job;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author FengHaixin
 * @description 一句话描述该文件的用途
 * @date 2016-05-23
 */
public class Test {
	/*
	 * public static void main(String[] args) {
	 * 
	 * ClassPathXmlApplicationContext context = new
	 * ClassPathXmlApplicationContext("spring.xml");
	 * 
	 * ClusterQuartz clusterQuartz =
	 * (ClusterQuartz)context.getBean("clusterQuartz");
	 * clusterQuartz.printUserInfo();
	 * 
	 * while (true) {
	 * 
	 * } }
	 */

	public static void main(String[] args) {
		String driver = "com.mysql.jdbc.Driver";
		String url = "jdbc:mysql://127.0.0.1:3306/quartz?characterEncoding=utf-8";
		String username = "root";
		String password = "123";
		try {
			Class.forName(driver);
			Connection con = DriverManager.getConnection(url, username,
					password);
			System.out.println("数据库连接成功！");
		} catch (SQLException se) {
			System.out.println("数据库连接失败！");
			se.printStackTrace();
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
